package student.aistar.layOrder.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * 本类用来演示:  枚举类型获取状态
 *
 * @author: qinFeng
 * @date: 2021/10/28 13:31
 */
@Getter
@AllArgsConstructor
public enum  DelayTypeEnum {

    //10s
    DELAY_10s(1),
    //60s
    DELAY_60s(2);
    private Integer type;

    public static DelayTypeEnum getDelayTypeEnum(Integer type){
        if(Objects.equals(type, DELAY_10s.type))
            return DELAY_10s;
        if(Objects.equals(type, DELAY_60s.type))
            return DELAY_60s;
        return null;
    }
}
